﻿//-----------------------------------------------------------------------
// <copyright>
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//----------------------------------------------------------------------- 
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Fulcrum.UnitTests
{
    [TestClass]
    public class SettingAttributeTests
    {
        [TestMethod]
        public void TestDescriptionDefault()
        {
            var settings = new SettingAttribute("AName");

            Assert.AreEqual(null, settings.Description);
        }

        [TestMethod]
        public void TestOptionalDefault()
        {
            var settings = new SettingAttribute("AName");

            Assert.AreEqual(false, settings.Optional);
        }

        [TestMethod]
        public void TestNullNameConstructor()
        {
            var settings = new SettingAttribute(null);

            Assert.AreEqual(null, settings.Name);
        }

        [TestMethod]
        public void TestEmptyNameConstructor()
        {
            var settings = new SettingAttribute(String.Empty);

            Assert.AreEqual("", settings.Name);
        }

        [TestMethod]
        public void TestNameConstructor()
        {
            var settings = new SettingAttribute("aname");

            Assert.AreEqual("aname", settings.Name);
        }
    }
}
